// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_rule_criterias
// * CreateDate    : 2014-06-05 18:30:00
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:00
// * LastChanger   : 2014-06-05 18:30:00
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmRuleCriteriasEntity : EntityBase
    {
        public HmRuleCriteriasTable TableSchema
        {
            get
            {
                return HmRuleCriteriasTable.Current;
            }
		}
		
		public HmRuleCriteriasEntity()
        {

        }
		
		public HmRuleCriteriasEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Criteriaid = Convert.ToInt32(CommonFunctions.ToObject(dr["criteriaid"]));
			this.Criteriaruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["criteriaruleid"]));
			this.Criteriausepredefined = Convert.ToByte(CommonFunctions.ToObject(dr["criteriausepredefined"]));
			this.Criteriapredefinedfield = Convert.ToByte(CommonFunctions.ToObject(dr["criteriapredefinedfield"]));
			this.Criteriaheadername = Convert.ToString(CommonFunctions.ToObject(dr["criteriaheadername"]));
			this.Criteriamatchtype = Convert.ToByte(CommonFunctions.ToObject(dr["criteriamatchtype"]));
			this.Criteriamatchvalue = Convert.ToString(CommonFunctions.ToObject(dr["criteriamatchvalue"]));
        }
		
		public HmRuleCriteriasEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Criteriaid = Convert.ToInt32(CommonFunctions.ToObject(dr["criteriaid"]));
			this.Criteriaruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["criteriaruleid"]));
			this.Criteriausepredefined = Convert.ToByte(CommonFunctions.ToObject(dr["criteriausepredefined"]));
			this.Criteriapredefinedfield = Convert.ToByte(CommonFunctions.ToObject(dr["criteriapredefinedfield"]));
			this.Criteriaheadername = Convert.ToString(CommonFunctions.ToObject(dr["criteriaheadername"]));
			this.Criteriamatchtype = Convert.ToByte(CommonFunctions.ToObject(dr["criteriamatchtype"]));
			this.Criteriamatchvalue = Convert.ToString(CommonFunctions.ToObject(dr["criteriamatchvalue"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmRuleCriteriasTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Criteriaid
        {
            get { return Convert.ToInt32(GetData(HmRuleCriteriasTable.C_criteriaid)); }
            set { SetData(HmRuleCriteriasTable.C_criteriaid, value); }
        }
		
        [DataMember]
        public int Criteriaruleid
        {
            get { return Convert.ToInt32(GetData(HmRuleCriteriasTable.C_criteriaruleid)); }
            set { SetData(HmRuleCriteriasTable.C_criteriaruleid, value); }
        }
		
        [DataMember]
        public byte Criteriausepredefined
        {
            get { return Convert.ToByte(GetData(HmRuleCriteriasTable.C_criteriausepredefined)); }
            set { SetData(HmRuleCriteriasTable.C_criteriausepredefined, value); }
        }
		
        [DataMember]
        public byte Criteriapredefinedfield
        {
            get { return Convert.ToByte(GetData(HmRuleCriteriasTable.C_criteriapredefinedfield)); }
            set { SetData(HmRuleCriteriasTable.C_criteriapredefinedfield, value); }
        }
		
        [DataMember]
        public string Criteriaheadername
        {
            get { return Convert.ToString(GetData(HmRuleCriteriasTable.C_criteriaheadername)); }
            set { SetData(HmRuleCriteriasTable.C_criteriaheadername, value); }
        }
		
        [DataMember]
        public byte Criteriamatchtype
        {
            get { return Convert.ToByte(GetData(HmRuleCriteriasTable.C_criteriamatchtype)); }
            set { SetData(HmRuleCriteriasTable.C_criteriamatchtype, value); }
        }
		
        [DataMember]
        public string Criteriamatchvalue
        {
            get { return Convert.ToString(GetData(HmRuleCriteriasTable.C_criteriamatchvalue)); }
            set { SetData(HmRuleCriteriasTable.C_criteriamatchvalue, value); }
        }
		
		#endregion
	}
	
	
}	

